<template>
    <div>
        <div v-if="item.value == type" v-for="item in list" :key="item.value" :class="[`type${type}`]">
            {{ item.label }}
        </div>
    </div>
</template>

<script>
export default {
    components: {},
    props: {
        type: {
            type: Number,
            default: 0
        }
    },
    data() {
        return {
            list: [{ value: -1, label: '待重修' }, { value: 0, label: '未开始' }, { value: 2, label: '已通过' }, { value: 1, label: '学习中' }]
        };
    },
    watch: {},
    methods: {},
    created() { },
    mounted() { },
};
</script>
<style scoped lang='scss'>
.type0 {
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC, sans-serif;
    font-weight: 400;
    color: #666666;
    line-height: 15px;
    width: 52px;
    height: 16px;
    background: rgba(153, 153, 153, 0.12);
    border-radius: 9px;
    border: 1px solid #999999;
}

.type1 {
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC, sans-serif;
    font-weight: 400;
    color: #28B28B;
    line-height: 15px;
    width: 52px;
    height: 16px;
    background: rgba(67, 218, 43, 0.07);
    border-radius: 9px;
    border: 1px solid #43DA2B;
}

.type2 {
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC, sans-serif;
    font-weight: 400;
    color: #2CACFF;
    line-height: 15px;
    width: 52px;
    height: 16px;
    background: rgba(44, 172, 255, 0.07);
    border-radius: 9px;
    border: 1px solid #2CACFF;
}

.type-1 {
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC, sans-serif;
    font-weight: 400;
    color: #E95756;
    line-height: 15px;
    width: 52px;
    height: 16px;
    background: rgba(233, 87, 86, 0.07);
    border-radius: 9px;
    border: 1px solid #E95756;
}
</style>
